<?php 

$tinymce = Html::jsUrl('tiny_mce/tiny_mce.js');
$script = <<<EOD
$('.bigText').tinymce({
script_url : '$tinymce',
theme : "simple",

});
EOD;


echo "<script type=\"text/javascript\">$.getScript(\"".Html::jsUrl('tiny_mce/jquery.tinymce.js')."\", function(){".$script."});</script>\n";


?>  
<div id="note<?php echo $model->id; ?>" class="containerPlus draggable resizable {buttons:'i,c', icon:'note.png', skin:'white', width:'500',iconized:'false', dock:'dock', rememberMe:true}" style="top:100px;left:400px">
    <div class="no"><div class="ne"><div class="n"><?php echo $model->title; ?></div></div>
      <div class="o"><div class="e"><div class="c">
        <div class="mbcontainercontent">
        



<div class="yiiForm">

<?php echo Html::beginForm(); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo Html::errorSummary($model); ?>

	<div class="simple">
		<?php echo Html::activeLabel($model,'title'); ?>
		<?php echo Html::activeTextField($model,'title'); ?>
	</div>
	<div class="simple">
	
		<?php echo Html::activeLabel($model,'content'); ?>
		<?php echo Html::activeTextArea($model,'content',array('class'=>'bigText')); ?>
	</div>

	<div class="action">
		<?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Save',array('class'=>'submit')); ?>
	</div>

<?php echo Html::endForm(); ?>

</div><!-- form -->











      </div></div></div>
      <div >
        <div class="so"><div class="se"><div class="s"> </div></div></div>
      </div>
    </div>
  </div>


<script type="text/javascript">
$('form').bind("submit", function() { return false; });

$.ajaxSetup({
'beforeSend': function(xhr) {xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest")},
});

$('.submit').bind("click", function () {
  jQuery.ajax({
'type':'POST',
'dataType' : 'html',
'url': '/note/update/id/<?php echo $model->id; ?>',
'cache':false,
'data':jQuery(this).parents("form").serialize()
});
  return false;
});
</script>
